package com.example.fizzbuzz.stage1;

public class FizzBuzz {
    private final static String FIZZ = "FIZZ";
    private final static String BUZZ = "BUZZ";
    private final static String FIZZBUZZ = "FIZZBUZZ";

    public String currentWord(int currentNum) {

        if (isFizzBuzz(currentNum)) {
            return FIZZBUZZ;
        }
        if (isFizz(currentNum)) {
            return FIZZ;
        }
        if (isBuzz(currentNum)) {
            return BUZZ;
        }
        return getNumString(currentNum);
    }
    private boolean isFizz(int input){
        return input%3==0;
    }
    private boolean isBuzz(int input){
        return input%5==0;
    }
    private boolean isFizzBuzz(int input){
        return isFizz(input)&&isBuzz(input);
    }
    private String getNumString(int input){
        return String.valueOf(input);
    }
}
